<template>
  <div @click="add">
    {{ count }}
  </div>
   <div @click="multiply">
    {{ double }}
  </div>
</template>

<script setup>
import { computed } from 'vue'
import { useStore } from 'vuex'
// import { useStore } from '../store/gvvuex.js'

console.log(useStore(),'=========')
let store = useStore()

let count = computed(()=>{
    // console.log(store,'========')
    return store.state.count
})
// console.log(count.value,'==========')
function add(){
    // store.commit('add')
    store.dispatch('asyncAdd')
}
let double = computed(()=>{
  return store.getters.double
})
</script>

<style>

</style>